"""函数的多返回值"""
# def return_demo():
#     return 1,2,"diablo"
# x,y,z=return_demo()
# print(x,y,z)
# print(type(x))
# print(type(y))
# print(type(z))

"""不同的参数类型"""
# 位置参数
# def parameter_demo01(x,y,z):
#     return x,y,z
# result=parameter_demo01(1,2,3)
# print(result)
# # 关键字参数
# def parameter_demo2(name,age):
#     return name,age
# result=parameter_demo2(name="diablo",age=20)
# print(result)
# # 默认参数
# def parameter_demo3(name,age=20):
#     return name,age
# result=parameter_demo3(name="diablo")
# print(result)
# 不定长参数
# 位置传递
# def parameter_demo04(*par1):
#     print(par1)
#     return par1
# a=parameter_demo04(1,2,3,"diablo")
# print(type(a))
# # 关键字传递
# def parameter_demo05(**par2):
#     print(par2)
#     return par2
# b=parameter_demo05(name="diablo",age=23,job="student")
# print(type(b))
"""匿名函数"""
# 函数作为参数传递
# def function_demo01(compute):
#     result=compute(1,2)
#     print(f"传入参数的类型是{type(compute)}")
#     print(f"结果是{result}")
# def function_demo02(x,y):
#     return x+y
# function_demo01(function_demo02)
# lambda函数
def func01(compute):
    result=compute(3,6)
    print(f"传入的参数类型是{compute}")
    print(f"结果是{result}")
func01(lambda x,y:x**y)
